@echo off

where /Q PowerShell
if errorlevel 1 goto nopowershell

set psh=powershell

%psh% -Version 3 -NoExit -NoProfile -Command "Set-Location '%~dp0'; .\New-AutoSPUpdaterSession"
goto end

:nopowershell
echo ERROR: Microsoft Windows PowerShell is required for setup, but was not found. 
echo Please download and install PowerShell from http://www.microsoft.com/powershell

:end
echo exiting...

